package com.pms.service;

import com.pms.common.PageBean;
import com.pms.pojo.BizAskLeave;

import java.util.List;

public interface BizAskLeaveService {


    // 分页查询请假记录
    PageBean<BizAskLeave> getLeaveList(String name, String leaveType,
                                       Integer status, String beginTime,
                                       String endTime, Integer page,
                                       Integer pageSize);

    // 审批通过
    void approve(Long id, String opinion, Long auditorId);

    // 审批驳回
    void reject(Long id, String opinion, Long auditorId);

    /**
     *
     * @param leave
     */
    void submitLeave(BizAskLeave leave);

    /**
     *
     * @param userId
     * @return
     */
    List<BizAskLeave> getLeavesByUserId(Long userId);

    /**
     *
     * @param id
     * @param userId
     */
    void cancelLeave(Long id, Long userId);

    /**
     *
     * @param id
     * @return
     */
    BizAskLeave getLeaveById(Long id);
}